﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects;

namespace SCMS.Model
{
    public static class ExpenseClaimExtensions
    {
        public static IQueryable<ExpenseRequest> IncludeCurrency(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Currency");
        }

        public static IQueryable<ExpenseRequest> IncludeCurrency1(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Currency1");
        }

        public static IQueryable<ExpenseRequest> IncludeCurrency2(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Currency2");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff.Person");
        }

        public static IQueryable<ExpenseRequest> IncludeStaffDesignation(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff.Designation");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff1(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff1.Person");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff1Designation(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff1.Designation");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff2(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff2.Person");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff2Designation(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff2.Designation");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff3(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff3.Person");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff3Designation(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff3.Designation");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff4(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff4.Person");
        }

        public static IQueryable<ExpenseRequest> IncludeStaff4Designation(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("Staff4.Designation");
        }

        public static IQueryable<ExpenseRequest> IncludeExpenseItems(this IQueryable<ExpenseRequest> queryable)
        {
            return ((ObjectQuery<ExpenseRequest>)queryable).Include("ExpenseItems");
        }

        public static IQueryable<ExpenseItem> IncludeProjectDonor(this IQueryable<ExpenseItem> queryable)
        {
            return ((ObjectQuery<ExpenseItem>)queryable).Include("ProjectBudget.BudgetCategory.ProjectDonor");
        }

        public static IQueryable<ExpenseItem> IncludeProjectBudget(this IQueryable<ExpenseItem> queryable)
        {
            return ((ObjectQuery<ExpenseItem>)queryable).Include("ProjectBudget");
        }

        public static IQueryable<ExpenseItem> IncludeExpenseRequest(this IQueryable<ExpenseItem> queryable)
        {
            return ((ObjectQuery<ExpenseItem>)queryable).Include("ExpenseRequest");
        }
    }
}
